home *** CD-ROM | disk | FTP | other *** search
- #include "bbs.h"
-
- extern BYTE NOFKeys,OnlineEdit;
- extern long GL1;
- extern struct User GHoozer;
- extern struct UserKeys GHoozer2;
- extern long Time_limit;
- int F6=0;
-
- void DeleteConfAccess(int slot);
- static UBYTE UUCPNumberInput(void)
- {
- AEPutStr(" \b");
- LineInput("",GSTR1,1,KEYBOARD_TIMEOUT);
- return((UBYTE)atol(GSTR1));
- }
-
- static int NumberInput(void)
- {
- AEPutStr(" \b\b\b\b\b");
- LineInput("",GSTR1,5,KEYBOARD_TIMEOUT);
- return((int)atol(GSTR1));
- }
-
- static ULONG LongNumberInput(void)
- {
- AEPutStr(" \b\b\b\b\b\b\b\b\b\b");
- LineInput("",GSTR1,10,KEYBOARD_TIMEOUT);
- return((ULONG)atol(GSTR1));
- }
-
- long Find_Last_Account(void)
- {
- BPTR fh;
- long size;
-
- strcpy(GSTR1,UserDataLoc);
- if(!(fh=Open(GSTR1,MODE_OLDFILE))) return(FAILURE);
-
- size=MySeek(fh,0,OFFSET_END);
- Close(fh);
- return((long)(size/sizeof(struct User)));
- }
-
- long Append(struct User *hoozer, struct UserKeys *hoozer2)
- {
- long stat;
- BPTR fh;
-
- strcpy(GSTR1,UserDataLoc);
- if(!(fh=Open(GSTR1,MODE_OLDFILE)))
- {
- if(Whence_The_Logon>=REMOTE_LOGON) return(FAILURE);
- fh=Open(GSTR1,MODE_NEWFILE);
- if(fh==NULL) return(FAILURE);
- }else
- Seek(fh,0,OFFSET_END);
-
- stat=Write(fh,(char *)hoozer,sizeof(struct User));
- if(stat!=sizeof(struct User)) {
- Close(fh); return(FAILURE);
- }
- Close(fh);
-
- strcpy(GSTR1,UserKeyLoc);
- if(!(fh=Open(GSTR1,MODE_OLDFILE))) return(FAILURE);
- Seek(fh,0,OFFSET_END);
-
- stat=Write(fh,(char *)hoozer2,sizeof(struct UserKeys));
- if(stat!=sizeof(struct UserKeys)) {
- Close(fh); return(FAILURE);
- }
- Close(fh);
- return(Find_Last_Account());
- }
-
- int Find_Open_Account(struct User *hoozer, struct UserKeys *hoozer2)
- {
- int slot;
- long stat;
- BPTR fh;
-
- strcpy(GSTR1,UserKeyLoc);
- if(!(fh=Open(GSTR1,MODE_OLDFILE)))
- {
- if(Whence_The_Logon>=REMOTE_LOGON) return(FAILURE);
- fh=Open(GSTR1,MODE_NEWFILE);
- if(fh==NULL) return(FAILURE);
- Close(fh);
- fh=Open(GSTR1,MODE_OLDFILE);
- if(fh==NULL) return(FAILURE);
- }
- slot=0;
- for(;;) {
- stat=Read(fh,(char *)hoozer2,sizeof(struct UserKeys));
- slot+=1;
- if(stat!=sizeof(struct UserKeys)) {
- Close(fh);
- slot=(int)Append(hoozer,hoozer2);
- hoozer->Slot_Number=slot;
- return(SUCCESS);
- }
- if(hoozer2->Number==0 && Sopt->Toggles[13]) {
- Close(fh);
- hoozer->Slot_Number=hoozer2->Number=slot;
- return(SUCCESS);
- }
- }
- Close(fh);
- return(SUCCESS);
- }
-
- static void Display_Account(int who, struct User *hoozer, struct UserKeys *hoozer2)
- {
- if(hoozer->Slot_Number==who) {
- sprintf(GSTR1,"H ACTIVE [%hu] BAUD: %d\r\n",hoozer->Slot_Number,hoozer2->baud_rate);
- AEPutStr(GSTR1);
-
- } else {
- sprintf(GSTR1,"HINACTIVE [%hu] \r\n",who);
- AEPutStr(GSTR1);
- }
-
- sprintf(GSTR1,"HA> Name: %-32s ",hoozer->Name);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"2HB> Loc.: %-29s\r\n",hoozer->Location);
- AEPutStr(GSTR1);
-
- AEPutStr("C> Pass ..........: ENCRYPTED\r\n");
-
- sprintf(GSTR1,"D> Phone Number ..: %-13s",hoozer->PhoneNumber);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"HE> Ratio .........: %-7hu\r\n",hoozer->Sec_Library);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"6HF> Area Name......: %s",hoozer->Conference_Access);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"HG> Ratio Type ....: %-5hu",hoozer->Sec_Board);
- AEPutStr(GSTR1);
- if(hoozer->Sec_Board==0) AEPutStr(" <-Byte)");
- if(hoozer->Sec_Board==1) AEPutStr(" <-B/F) ");
- if(hoozer->Sec_Board==2) AEPutStr(" <-File)");
-
- sprintf(GSTR1,"6HH> Sec_Level .....: %-5hu",hoozer->Sec_Status);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"HI> Uploads .......: %-10hu\r\n",hoozer->Uploads);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"6HJ> AutoReJoin ....: %-10hu",hoozer->ConfRJoin);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"HK> Downloads .....: %-10hu\r\n",hoozer->Downloads);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"6HL> Messages_Posted: %-7hu",hoozer->Messages_Posted);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"HM> Bytes Uled ....: %-10ld\r\n",hoozer->Bytes_Upload);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"6HN> New_User ......: %s #Calls: %-12ld",(hoozer->New_User?"Yes":"No "),hoozer->Times_Called);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"1HO> Bytes Dled ....: %-10ld\r\n",hoozer->Bytes_Download);
- AEPutStr(GSTR1);
-
- sprintf(GSTR2,"%s",ctime(&hoozer->Time_Last_On));
- GSTR2[24]='\0';
- sprintf(GSTR1,"9HLast Called ...: %s",GSTR2);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"1HQ> Byte Limit ....: %-10ld\r\n",hoozer->Daily_Bytes_Limit);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"39HComputer Type .: %-16s",ComputerTypes[hoozer->Sec_Bulletin]);
- AEPutStr(GSTR1);
- AEPutStr("39HScreen Type ..: ");
- sprintf(GSTR1,"%sScreenTypes",Cmds->BBSLoc);
- sprintf(GSTR2,"TITLE.%d",hoozer->ScreenType+1);
- AEPutStr("56H");
- if(GetFromIconStr(GSTR1,GSTR2,GSTR2))
- {
- sprintf(GSTR1,"%-16s",GSTR2);
- AEPutStr(GSTR1);
- }
- //(RTS)
- sprintf(GSTR1,"36HY> Cps UP: %-4hu ",hoozer2->UPcps);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"57HZ> Cps DN: %-4hu ",hoozer2->DNcps);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"1HR> Time_Limit: [%-8lu] secs ",hoozer->Time_Limit);
- AEPutStr(GSTR1);
- sprintf(GSTR1," S> Time_Used: [%-8lu] secs T> UUCP: %d\r\n",hoozer->Time_Used,hoozer->UUCPA);
- AEPutStr(GSTR1);
- AEPutStr("\r\n");
-
- AEPutStr("X=EXIT-NOSAVE TAB=Cont ~=SAVE 1-6=Presets 9=RE-ACTIVATE DEL=DELETE\r\n");
- }
-
- static void Display_Account_Info(int who, struct User *hoozer,struct UserKeys *hoozer2)
- {
- if(hoozer->Slot_Number==who) {
- sprintf(GSTR1,"H ACTIVE [%hu] BAUD: %d\r\n",hoozer->Slot_Number,hoozer2->baud_rate);
- // sprintf(GSTR1,"H ACTIVE [%hu] \r\n",hoozer->Slot_Number);
- AEPutStr(GSTR1);
- } else {
- sprintf(GSTR1,"HINACTIVE [%hu] \r\n",who);
- AEPutStr(GSTR1);
- }
-
- sprintf(GSTR1,"0H%-32s",hoozer->Name);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"1H%-29s",hoozer->Location);
- AEPutStr(GSTR1);
-
- AEPutStr("1HENCRYPTED\r\n");
-
- sprintf(GSTR1,"1H%-13s",hoozer->PhoneNumber);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"1H%-7hu",hoozer->Sec_Library);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"6H%-10s",hoozer->Conference_Access);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"1H%-5hu",hoozer->Sec_Board);
- AEPutStr(GSTR1);
- if(hoozer->Sec_Board==0) AEPutStr(" <-Byte)");
- if(hoozer->Sec_Board==1) AEPutStr(" <-B/F) ");
- if(hoozer->Sec_Board==2) AEPutStr(" <-File)");
-
- sprintf(GSTR1,"6H%-5hu",hoozer->Sec_Status);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"1H%-10hu",hoozer->Uploads);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"6H%-7hu",hoozer->ConfRJoin);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"1H%-10hu",hoozer->Downloads);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"6H%-7hu",hoozer->Messages_Posted);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"1H%-10ld",hoozer->Bytes_Upload);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"6H%s #Calls: %-12ld",(hoozer->New_User?"Yes":"No "),hoozer->Times_Called);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"21H%-10ld",hoozer->Bytes_Download);
- AEPutStr(GSTR1);
-
- sprintf(GSTR2,"%s",ctime(&hoozer->Time_Last_On));
- GSTR2[24]='\0';
- sprintf(GSTR1,"6H%s",GSTR2);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"21H%-10ld",hoozer->Daily_Bytes_Limit);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"56H%-16s",ComputerTypes[hoozer->Sec_Bulletin]);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"%sScreenTypes",Cmds->BBSLoc);
- sprintf(GSTR2,"TITLE.%d",hoozer->ScreenType+1);
- AEPutStr("56H");
- if(GetFromIconStr(GSTR1,GSTR2,GSTR2))
- {
- sprintf(GSTR1,"%-16s",GSTR2);
- AEPutStr(GSTR1);
- }
-
- //(RTS)
- sprintf(GSTR1,"39HCps UP: %-4hu ",hoozer2->UPcps);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"60HCps DN: %-4hu ",hoozer2->DNcps);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"17H%-6lu",hoozer->Time_Limit);
- AEPutStr(GSTR1);
- sprintf(GSTR1,"51H%-6lu",hoozer->Time_Used);
- AEPutStr(GSTR1);
-
- sprintf(GSTR1,"76H%d",hoozer->UUCPA);
- AEPutStr(GSTR1);
-
- }
-
-
- int EditInfo(int which, struct User *hoozer, struct UserKeys *hoozer2)
- {
- int flag, command;
-
- NOFKeys=1;
- Display_Account(which,hoozer,hoozer2);
- strcpy(GSTR1,hoozer->Name);
- (void)strupr(GSTR1);
- strcpy(hoozer2->UserName,GSTR1);
-
- FOREVER {
- flag=0;
- command=ReadChar(KEYBOARD_TIMEOUT);
- if(command==NO_CARRIER) return(NO_CARRIER);
- switch(command) {
- case 'X': /* NO-SAVE */
- AEPutStr("No-Save\r\n");
- flag=1;
- break;
- case '\t':
- flag=2;
- break;
- case '\177': /* DELETE */
- AEPutStr("Delete\r\n");
- GI2=which;
- hoozer->Slot_Number=0;
- hoozer2->Number=0;
-
- /* changed from ForceSave_Account Thu Jan 30 04:17:48 1992 */
- GI1=Save_Account(hoozer,hoozer2,GI2,1);
- if(GI1!=SUCCESS)
- AEPutStr("Can't Save account\r\n");
- DeleteConfAccess(GI2);
- Display_Account_Info(which,hoozer,hoozer2);
- flag=0;
- break;
- case ' ':
- Display_Account_Info(which,hoozer,hoozer2);
- break;
- case '+':
- if(!OnlineEdit) {
- which=which+1;
- if(Load_Account(which,hoozer,hoozer2)!=FAILURE)
- Display_Account_Info(which,hoozer,hoozer2);
- else {
- which=1;
- Load_Account(which,hoozer,hoozer2);
- Display_Account_Info(which,hoozer,hoozer2);
- }
- }
- break;
- case '-':
- if(!OnlineEdit) {
- which=which-1;
- if(which<1)
- which=(int)Find_Last_Account();
- Load_Account(which,hoozer,hoozer2);
- Display_Account_Info(which,hoozer,hoozer2);
- }
- break;
- case '~': /* SAVE */
- AEPutStr("Save\r\n");
- hoozer->New_User=0;
- Display_Account_Info(which,hoozer,hoozer2);
- if(hoozer->Slot_Number==0) {
- hoozer2->Number=0;
- GI1=Save_Account(hoozer,hoozer2,which,1); /* 1 = FORCE SAVE */
-
- if(GI1!=SUCCESS)
- AEPutStr("Can't Save account\r\n");
- } else {
- hoozer2->Number=hoozer->Slot_Number;
- /* save using Slot_number */
- GI1=Save_Account(hoozer,hoozer2,0,0); /* Not forced */
- if(GI1!=SUCCESS)
- AEPutStr("Can't Save account\r\n");
- }
- break;
- case '8': case '7':
- case '6': case '5': case '4': case '3':
- case '2': /* VALIDATE */
- case '1':
- sprintf(GSTR1,"%c ",command);
- GI1=(int)atol(GSTR1);
- AEPutStr("Preset ");
- AEPutStr(GSTR1);
- AEPutStr("\r\n");
- sprintf(GSTR1,"%sACCESS/Preset.%c",Cmds->BBSLoc,command);
-
- hoozer->New_User=0;
- GI1-=1;
- hoozer->New_User=0;
- hoozer->Sec_Status=IntFromIcon(GSTR1,"PRESET.ACCESS");
- hoozer->Sec_Library=IntFromIcon(GSTR1,"PRESET.RATIO");
- hoozer->Time_Limit=IntFromIcon(GSTR1,"PRESET.TIME_LIMIT");
- hoozer->Sec_Board=IntFromIcon(GSTR1,"PRESET.RATIO_TYPE");
- GetFromIconStr(GSTR1,"PRESET.AREA",hoozer->Conference_Access);
- hoozer->Daily_Bytes_Limit=IntFromIcon(GSTR1,"PRESET.DAILY_BYTE_LIMIT");
- hoozer->Time_Used=0L;
- hoozer->Time_Total=hoozer->Time_Limit;
- hoozer2->UPcps = 0;
- hoozer2->DNcps = 0;
- //(RTS) hoozer2->baud_rate = 0;
- Save_Account(hoozer,hoozer2,0,0);
- (void)Display_Account_Info(which,hoozer,hoozer2);
- break;
-
- case '9': /* RE-ACTIVATE */
- AEPutStr("Re-Activate\r\n");
- hoozer->Slot_Number=which;
- flag=0;
- break;
- case 'a': case 'A': /* NAME */
- AEPutStr("0H");
- LineInput(hoozer->Name,hoozer->Name,30,KEYBOARD_TIMEOUT);
- strcpy(GSTR1,hoozer->Name);
- (void)strupr(GSTR1);
- strcpy(hoozer2->UserName,GSTR1);
- flag=0;
- break;
- case 'b': case 'B': /* Location */
- AEPutStr("1H");
- LineInput(hoozer->Location,
- hoozer->Location,29,KEYBOARD_TIMEOUT);
- flag=0;
- break;
-
- case 'c': case 'C': /* PASS */
-
- AEClearMem(GSTR1,32);
- if(Whence_The_Logon>=REMOTE_LOGON && !F6)
- {
- if(User.Slot_Number==1)
- {
- AEPutStr("1H ");
- AEPutStr("1H");
- LineInput(GSTR1,GSTR1,32,KEYBOARD_TIMEOUT);
- strupr(GSTR1);
- AEPutStr("1HENCRYPTED ");
- AECryptCpy(hoozer->PassKey,GSTR1);
- break;
- }
- }
- else
- {
- AEPutStr("1H 1H");
- LineInput(GSTR1,GSTR1,32,KEYBOARD_TIMEOUT);
- strupr(GSTR1);
- AEPutStr("1HENCRYPTED ");
- AECryptCpy(hoozer->PassKey,GSTR1);
- break;
- }
- flag=0;
- break;
-
-
-
- case 'd': case 'D': /* Phone number */
- AEPutStr("1H");
- LineInput(hoozer->PhoneNumber,
- hoozer->PhoneNumber,12,KEYBOARD_TIMEOUT);
- flag=0;
- break;
- case 'e': case 'E': /* RATIO */
- AEPutStr("1H");
- hoozer->Sec_Library=NumberInput();
- flag=0;
- break;
- case 'f': case 'F': /* conference access */
- AEPutStr("6H");
- LineInput(hoozer->Conference_Access,hoozer->Conference_Access,9,KEYBOARD_TIMEOUT);
- flag=0;
- break;
- case 'g': case 'G': /* Ratio Type */
- AEPutStr("1H");
- hoozer->Sec_Board=NumberInput();
- if(hoozer->Sec_Board<0 || hoozer->Sec_Board > 2)
- {
- AEPutStr("\a"); hoozer->Sec_Board=0; }
- sprintf(GSTR1,"HG> Ratio Type ....: %-5hu",hoozer->Sec_Board);
- AEPutStr(GSTR1);
- if(hoozer->Sec_Board==0) AEPutStr(" <-Byte)");
- if(hoozer->Sec_Board==1) AEPutStr(" <-B/F) ");
- if(hoozer->Sec_Board==2) AEPutStr(" <-File)");
-
- flag=0;
- break;
- case 'h': case 'H': /* SEC_Level */
- if(Whence_The_Logon>=REMOTE_LOGON && !F6)
- {
- if(User.Slot_Number==1)
- {
- AEPutStr("6H");
- hoozer->Sec_Status=NumberInput();
- }
- }
- else
- {
- AEPutStr("6H");
- hoozer->Sec_Status=NumberInput();
- }
- flag=0;
- break;
- case 'i': case 'I': /* UPLOADS */
- AEPutStr("1H");
- hoozer->Uploads=NumberInput();
- flag=0;
- break;
- case 'j': case 'J': /* conference ReJoin */
- AEPutStr("6H");
- hoozer->ConfRJoin=NumberInput();
- flag=0;
- break;
- case 'k': case 'K': /* DOWNLOADS */
- AEPutStr("1H");
- hoozer->Downloads=NumberInput();
- flag=0;
- break;
- case 'l': case 'L': /* MESSAGES_POSTED */
- AEPutStr("6H");
- hoozer->Messages_Posted=NumberInput();
- flag=0;
- break;
- case 'm': case 'M': /* Bytes Uploaded */
- AEPutStr("1H");
- hoozer->Bytes_Upload=LongNumberInput();
- flag=0;
- break;
- case 'n': case 'N': /* New user ?? */
- AEPutStr("6H 6H");
- command=YesNo(0);
- if(command) hoozer->New_User=1;
- else hoozer->New_User=0;
- flag=0;
- break;
- case '#':
- AEPutStr("8H");
- hoozer->Times_Called=LongNumberInput();
- flag=0;
- break;
- case 'o': case 'O': /* Bytes Downloaded */
- AEPutStr("21H");
- hoozer->Bytes_Download=LongNumberInput();
- flag=0;
- break;
- case 'q': case 'Q': /* Daily Bytes Limit */
- AEPutStr("21H");
- hoozer->Daily_Bytes_Limit=LongNumberInput();
- flag=0;
- break;
- case 'r': case 'R': /* Time_Limit */
- AEPutStr("17H");
- hoozer->Time_Limit=LongNumberInput();
- if(hoozer->Time_Total<hoozer->Time_Limit)
- hoozer->Time_Total=hoozer->Time_Limit;
- else {
- if(Cmds->AcLvl[LVL_KEEP_UPLOAD_CREDIT]<2)
- hoozer->Time_Total=hoozer->Time_Limit;
- }
- if(User.Slot_Number==hoozer->Slot_Number)
- Time_limit=hoozer->Time_Total-hoozer->Time_Used;
- flag=0;
- break;
- case 's': case 'S': /* TIME_USED */
-
- AEPutStr("51H");
- hoozer->Time_Used=LongNumberInput();
- if(User.Slot_Number==hoozer->Slot_Number)
- Time_limit=hoozer->Time_Total-hoozer->Time_Used;
- flag=0;
- break;
- case 't': case 'T':
- AEPutStr("76H");
- hoozer->UUCPA=UUCPNumberInput();
- flag=0;
- break;
- case 'y': case 'Y': /* zero upcps rate */
- AEPutStr("47H"); /* offset by 11 */
- hoozer2->UPcps=LongNumberInput();
- flag=0;
- break;
- case 'z': case 'Z': /* zero dncps rate */
- AEPutStr("68H"); /* offset by 11 */
- hoozer2->DNcps=LongNumberInput();
- flag=0;
- break;
-
- default:
- flag=0;
- break;
- }
- AEPutStr("1H");
- if(flag) { break; }
- }
- NOFKeys=0;
- return((UWORD)flag);
- }
-
- WORD CheckNEdit(WORD which)
- {
- WORD stat;
-
- GI1=Find_Last_Account();
- if(which>GI1) {
- AEPutStr("Higher Than Maximum Account\r\n");
- return(FAILURE);
- }
- AEPutStr("\014");
- GI1=Load_Account(which,&GHoozer,&GHoozer2);
- if(GI1==FAILURE)
- {
- AEPutStr("Warning, error while loading account\r\n");
- return(FAILURE);
- }
- AEPutStr("\017\014");
- stat=EditInfo(which,&GHoozer,&GHoozer2);
- return(stat);
- }
-
- int Edit_Accounts(void)
- {
- WORD stat;
- int which,lw;
-
- sprintf(GSTR1,"%sCommands/SysCmd/",Cmds->BBSLoc);
- strcpy(GSTR2,"ACCOUNTS");
- if(!CustomCommand(GSTR1,GSTR2,1))
- {
- FOREVER {
- AEPutStr("\r\nS>earch by name N>ew account editing\r\nEdit which account? ");
- GI1=LineInput("",GSTR3,5,KEYBOARD_TIMEOUT);
- if(GI1<=0) { goto RETURNF; }
- if(toupper(GSTR3[0])=='N') {
- List_New_Accounts();
- continue;
- }
-
- if(toupper(GSTR3[0])=='S') {
- AEPutStr("\r\nUserName: ");
- GI1=LineInput("",GSTR3,30,KEYBOARD_TIMEOUT);
- if(GI1<=0) goto RETURNF;
- lw=0;
- do {
- lw++;
- which=Find_User_From_Name(lw,GSTR3,&GHoozer,&GHoozer2);
- if(which<=0) {
- AEPutStr("\r\nSorry no user under that name.\r\n");
- continue;
- }
- lw=which;
- stat=CheckNEdit(which);
- } while(which>0&&stat==2);
- continue;
- }
-
- which=(int)atol(GSTR3);
- if(which<=0) goto RETURNF;
- CheckNEdit(which);
- }
- RETURNF:
- AEPutStr("\r\n");
- }
- return(SUCCESS);
- }
-
- int List_New_Accounts(void)
- {
- int FOFLAG;
- int x;
- long Maximum,stat;
- BPTR fh;
-
- OnlineEdit=1;
- FOFLAG=0;
- AEPutStr("\017\014BSearching...");
- Maximum=Find_Last_Account();
- strcpy(GSTR1,UserKeyLoc);
- if(fh=Open(GSTR1,MODE_OLDFILE))
- {
- for(x=1;x<=Maximum;++x)
- {
- stat=Read(fh,(char *)&GHoozer2,sizeof(struct UserKeys));
- // printf("Name %-31s New User = %d\n",GHoozer2.UserName,GHoozer2.New_User);
- if(stat!=sizeof(struct UserKeys)) {
- sprintf(GSTR2,"FILE-FAULT[%d], ",x);
- AEPutStr(GSTR2);
- } else {
- if(GHoozer2.New_User==1&&GHoozer2.Number!=0) {
- FOFLAG=1;
- Load_Account(x,&GHoozer,&GHoozer2);
- stat=EditInfo(x,&GHoozer,&GHoozer2);
- if(stat==1) {
- AEPutStr("\r\nAbort\r\n");
- goto AcctMark1;
- }
- AEPutStr("Searching...");
- }
- }
- if(Whence_The_Logon!=LOCAL_LOGON&&Check_Online_Status()<0) {
- Close(fh);
- OnlineEdit=0;
- return(NO_CARRIER);
- }
- if(CheckInput()) {
- stat=ReadChar(KEYBOARD_TIMEOUT);
- switch(stat) {
- case '\023':
- PurgeLine();
- AEPutStr("Any key..");
- stat=ReadChar(KEYBOARD_TIMEOUT);
- if(stat==TIMEOUT||stat==NO_CARRIER) {
- Close(fh);
- OnlineEdit=0;
- return(stat);
- }
- AEPutStr("\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b");
- break;
- case '\003': /* ^C */
- AEPutStr("\r\nAbort\r\n");
- goto AcctMark1; break;
- default:
- PurgeLine();
- break;
- }
- }
- }
- AcctMark1:
- if(!FOFLAG) AEPutStr("No new users.");
- Close(fh);
- }
- AEPutStr("\r\n\r\n");
- OnlineEdit=0;
- return(SUCCESS);
- }
-
- void DeleteConfAccess(int slot)
- {
- BPTR bi;
- struct ConfBase t;
- int i;
- char temp[100];
- char Conference_Location[100];
- for(i=0;i<Boards_Are_Active;i++)
- {
- GetConfName(temp,Conference_Location,i);
- sprintf(temp,"%sConf.DB",Conference_Location);
- bi=Open(temp,MODE_OLDFILE);
- if(bi==NULL)
- {
- return;
- }
-
- Seek(bi,(ULONG)(slot-1)*(ULONG)(sizeof(struct ConfBase)),OFFSET_BEGINNING);
- FRead(bi,(APTR)&t,sizeof(struct ConfBase),1);
- t.ConfRead=0;
- t.NewSinceDate=0L;
- t.ConfRead=0;
- t.ConfYM=0;
- t.Bytes_Download=0L;
- t.Bytes_Upload=0L;
- t.Daily_Bytes_Limit=0L;
- t.Daily_Bytes_Dld=0L;
- t.Upload=0;
- t.Downloads=0;
- t.RatioType=0;
- t.Ratio=0;
- t.Messages_Posted=0;
- t.Active=0;
- t.Access=0;
- Seek(bi,(ULONG)(slot-1)*(ULONG)(sizeof(struct ConfBase)),OFFSET_BEGINNING);
- Write(bi,(APTR)&t,sizeof(struct ConfBase));
-
- Close(bi);
- }
- GetConfName(temp,Conference_Location,CN-1);
- }
-